package com.fjzn.detect.service.exection;

import com.fjzn.detect.common.enums.web.ResponseStatus;

/**
 * 业务异常
 * @author yzh
 * @since 2021年04月25日18:53:12
 */
public class BusinessException extends RuntimeException{

    private ResponseStatus status;

    public BusinessException() {
        super();
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(ResponseStatus status) {
        super(status.desc());
        this.status = status;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    protected BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public ResponseStatus getStatus() {
        return status;
    }
}
